﻿#region Using namespaces

using System;
using System.Collections.Generic;

using BOL.Apps.GeneNetworkBrowser.Analysis;

#endregion

namespace BOL.Apps.GeneNetworkBrowser.ViewModels
{
    public class AnalysisDocumentViewModel : DocumentViewModel
    {
        #region Protected variables

        protected IAnalysis _analysis;
        protected string _description;
        protected DateTime _dateTime;
        protected IDictionary<string, dynamic> _data;
        protected IDictionary<string, dynamic> _parameters;
        protected IDictionary<string, dynamic> _statistics;
        protected IDictionary<string, dynamic> _others;

        #endregion

        #region Public properties

        public string Description
        {
            get { return _description; }
            set
            {
                if (value != _description)
                {
                    IsChanged = true;

                    _description = value;
                    OnPropertyChanged("Description");
                }
            }
        }

        public DateTime DateTime
        {
            get { return _dateTime; }
            set
            {
                if (value != _dateTime)
                {
                    IsChanged = true;

                    _dateTime = value;
                    OnPropertyChanged("DateTime");
                }
            }
        }

        public IDictionary<string, dynamic> Data
        {
            get { return _data; }
            set
            {
                if (value != _data)
                {
                    IsChanged = true;

                    _data = value;
                    OnPropertyChanged("Data");
                }
            }
        }

        public IDictionary<string, dynamic> Parameters
        {
            get { return _parameters; }
            set
            {
                if (value != _parameters)
                {
                    IsChanged = true;

                    _parameters = value;
                    OnPropertyChanged("Parameters");
                }
            }
        }

        public IDictionary<string, dynamic> Statistics
        {
            get { return _statistics; }
            set
            {
                if (value != _statistics)
                {
                    IsChanged = true;

                    _statistics = value;
                    OnPropertyChanged("Statistics");
                }
            }
        }

        public IDictionary<string, dynamic> Others
        {
            get { return _others; }
            set
            {
                if (value != _others)
                {
                    IsChanged = true;

                    _data = value;
                    OnPropertyChanged("Others");
                }
            }
        }

        #endregion

        #region Constructor

        public AnalysisDocumentViewModel(string filePath)
            : base(filePath)
        {
            //_analysis = OpenAnalysis(filePath);
        }

        //protected abstract IAnalysis OpenAnalysis(string filePath);

        #endregion
    }
}
